<%@ page pageEncoding="UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="pg"  uri="http://jsptags.com/tags/navigation/pager" %>
<% 
String url = request.getParameter("url");
int total =  Integer.parseInt(request.getParameter("items"));
int pageSize = Integer.parseInt(request.getParameter("pageSize")); 
%>
<!-- <ul class="pagination"> -->
<pg:pager url="<%=url %>" items="<%=total %>" maxPageItems="<%=pageSize %>" maxIndexPages="10" export="currentPageNumber=pageNumber">  
    <pg:first>  
       <%-- <li> <a href="${pageUrl }">首页</a>  </li> --%>
       <a href="${pageUrl }">首页</a> 
    </pg:first>  
    <pg:prev>  
       <%-- <li><a href="${pageUrl }">上一页</a>  </li> --%>
      <a href="${pageUrl }">上一页</a>  
    </pg:prev>  
    <pg:pages>  
        <c:choose>  
            <c:when test="${currentPageNumber eq pageNumber}">  
               <%-- <li class="active"><a href="#"> ${pageNumber } </a></li> --%>
               <span style="color:red">${pageNumber }</span>
            </c:when>  
            <c:otherwise>  
                <%-- <li><a href="${pageUrl }">${pageNumber }</a>  </li> --%>
                <a href="${pageUrl }">${pageNumber }</a>
            </c:otherwise>  
        </c:choose>  
    </pg:pages>  
    <pg:next>  
      <%-- <li>  <a href="${pageUrl }">下一页</a>  </li> --%>
      <a href="${pageUrl }">下一页</a>
    </pg:next>  
    <pg:last>  
     <%--  <li>  <a href="${pageUrl }">最后一页</a>  </li> --%>
     <a href="${pageUrl }">最后</a>
    </pg:last>  
</pg:pager> 
<!-- </ul> -->